home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / rawstat / RCS / rawrecov.c,v < prev    next >
Encoding:
Text File  |  1989-10-24  |  1.8 KB  |  100 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     89.10.24.10.14.52;  author brent;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     89.10.11.07.51.41;  author brent;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Recovery module statistics printing
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @Fixed label.
  28. @
  29. text
  30. @/* 
  31.  * rawproc.c --
  32.  *
  33.  *    Print raw format PROC statistics.
  34.  *
  35.  * Copyright (C) 1986 Regents of the University of California
  36.  * All rights reserved.
  37.  */
  38.  
  39. #ifndef lint
  40. static char rcsid[] = "$Header: /a/newcmds/rawstat/RCS/rawrecov.c,v 1.1 89/10/11 07:51:41 brent Exp $ SPRITE (Berkeley)";
  41. #endif not lint
  42.  
  43. #include "sprite.h"
  44. #include "stdio.h"
  45. #include "sysStats.h"
  46. #include "kernel/recov.h"
  47.  
  48.  
  49. /*
  50.  *----------------------------------------------------------------------
  51.  *
  52.  * PrintRawProcMigStat --
  53.  *
  54.  *    Prints proc_MigStats.
  55.  *
  56.  * Results:
  57.  *    None.
  58.  *
  59.  * Side effects:
  60.  *    None.
  61.  *
  62.  *----------------------------------------------------------------------
  63.  */
  64.  
  65. PrintRawRecovStat()
  66. {
  67.     Recov_Stats stats;        /* statistics buffer */
  68.     Recov_Stats *X = &stats;
  69.     int status;
  70.  
  71.     bzero((Address) &stats, sizeof(stats));
  72.     status = Sys_Stats(SYS_RECOV_STATS, sizeof(stats), (Address) &stats);
  73.     if (status != SUCCESS) {
  74.     return;
  75.     }
  76.  
  77.     printf("Recov_Stats\n");
  78.  
  79.     ZeroPrint("packets        %8u\n", X->packets);
  80.     ZeroPrint("pings          %8u\n", X->pings);
  81.     ZeroPrint("suppressed     %8u\n", X->pingsSuppressed);
  82.     ZeroPrint("timeouts       %8u\n", X->timeouts);
  83.     ZeroPrint("crashes        %8u\n", X->crashes);
  84.     ZeroPrint("reboots        %8u\n", X->reboots);
  85.     ZeroPrint("hostsMonitored %8u\n", X->numHostsPinged);
  86. }
  87. @
  88.  
  89.  
  90. 1.1
  91. log
  92. @Initial revision
  93. @
  94. text
  95. @d11 1
  96. a11 1
  97. static char rcsid[] = "$Header: /a/newcmds/rawstat/RCS/rawproc.c,v 1.1 89/09/11 11:46:08 douglis Exp $ SPRITE (Berkeley)";
  98. d56 1
  99. @
  100.